<template>
	<view>
		<image v-for="(item,index) in imgArr" :src="title+item.banner_pic" mode="scaleToFill" v-bind:key="index"></image>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				imgArr: [],
				title:'http://localhost:5000'
			}
		},
		onLoad() {
			//#ifdef H5
			uni.request({
				url: "/api/banner/list",
				success: (res) => {
					this.imgArr = res.data.data
				}
			})
			//#endif
			//#ifdef MP-WEIXIN
			uni.request({
				url: "http://localhost:5000/api/banner/list",
				success: (res) => {
					this.imgArr = res.data.data
				}
			})
			//#endif
		},
		methods: {

		}
	}
</script>

<style>

</style>
